翻訳と辞書
Words near each other
・ Referral (medicine)
・ Referral chain
・ Referral economy
・ Referral marketing
・ Referral recruitment
・ Referred itch
・ Referred pain
・ Referring expression
・ Referee (disambiguation)
・ Referee (futsal)
・ Referee (professional wrestling)
・ Referee (Queoff)
・ Referee in Bankruptcy
・ Referee technical decision
・ Reference
Reference (C++)
・ Reference (computer science)
・ Reference (disambiguation)
・ Reference (film)
・ Reference 54
・ Reference and User Services Association awards
・ Reference and User Services Quarterly
・ Reference antenna
・ Reference architecture
・ Reference beam
・ Reference Broadcast Infrastructure Synchronization
・ Reference Broadcast Time Synchronization
・ Reference card
・ Reference circuit
・ Reference class forecasting


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Reference (C++) : ウィキペディア英語版
Reference (C++)

In the C++ programming language, a reference is a simple reference datatype that is less powerful but safer than the pointer type inherited from C. The name ''C++ reference'' may cause confusion, as in computer science a reference is a general concept datatype, with ''pointers'' and ''C++ references'' being specific reference datatype implementations. The definition of a reference in C++ is such that it does not need to exist. It can be implemented as a new name for an existing object (similar to rename keyword in Ada).
== Syntax and terminology ==
The declaration of the form:
&
where is a type and is an identifier whose type is reference to .
Examples:
int A = 5;
int& rA = A;

extern int& rB;
Here, rA and rB are of type "reference to int"
int& foo ();
foo() is a function that returns a "reference to int"
void bar (int& rP);
bar() is a function with a reference parameter, which is a "reference to int"
class MyClass ;
MyClass is a class with a member which is reference to int
int funcX() ; int (&xFunc)() = funcX;
funcX() is a function that returns a (non-reference type) int and xFunc() is an ''alias'' for funcX
const int& ref = 65;
const int& ref is a constant reference pointing to a piece of storage having value 65.
Types which are of kind "reference to " are sometimes called reference types. Identifiers which are of reference type are called reference variables. To call them ''variable'', however, is in fact a misnomer, as we will see.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Reference (C++)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.